package com.lovo.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lovo.bean.User;
import com.lovo.mapper.UserMapper;
import com.lovo.service.IUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author lovo
 * @since 2022-09-21
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {

    @Override
    public User login(String name, String pwd) {
        QueryWrapper<User> qw = new QueryWrapper<>();
        qw.eq("u_name", name);
        qw.eq("u_pwd", pwd);
        return baseMapper.selectOne(qw);
    }
}
